function MyController($scope, $timeout) {
    var updateClock = function() {
        $scope.clock = new Date();
        $timeout(function() {
            updateClock();
        }, 1000);
    };
    updateClock();
};

/*MyController函数接受两个参数，即该DOM元素的$scope和$timeout*/
